package br.wh.util;

import android.app.Activity;
import android.content.Context;
import android.os.Vibrator;

public class AndroidHardware extends Activity {

	public static void vibrar(Context context, long duracao) {
		Vibrator vibrator = (Vibrator) context
				.getSystemService(Context.VIBRATOR_SERVICE);
		vibrator.vibrate(duracao);
	}

	public static void vibrar(Context context, int Repeticoes) {
		Vibrator vibrator = (Vibrator) context
				.getSystemService(Context.VIBRATOR_SERVICE);
		long[] padraoDeVibracao = new long[] { 100, 1000, 100, 1000 };
		vibrator.vibrate(padraoDeVibracao, Repeticoes);
	}

	public static void vibrar(Context context) {
		Vibrator vibrator = (Vibrator) context
				.getSystemService(Context.VIBRATOR_SERVICE);
		long[] padraoDeVibracao = new long[] { 100, 1000, 100, 1000 };
		vibrator.vibrate(padraoDeVibracao, -1);
	}

}
